package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.MessageDAO;
import domain.Message;
import service.IMessageService;

@Service
public class MessageService implements IMessageService{
	
	@Autowired
	private MessageDAO dao;
	
	public Integer write(Message msg) {
		return dao.write(msg); 
	}

	public List<Message> listAll(Integer startPage, Integer pageSize) {
		return dao.listAll(startPage, pageSize);
	}

	public Integer delete(Long id) {
		return dao.delete(id);
	}

}
